From: Keir Fraser Date: Thu, 23 Jul 2009 08:00:21 +0000 (+0100) Subject: xend: Don't call decode() if PV_{kernel,ramdisk} are '' X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~13562 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success//%22http:/www.example.com/cgi/success/?a=commitdiff_plain;h=3aa462c6294408e5d0b7a44b62b962e446ed6cd7;p=xen.git xend: Don't call decode() if PV_{kernel,ramdisk} are '' Signed-off-by: Masaki Kanno --- diff --git a/tools/python/xen/xend/XendConfig.py b/tools/python/xen/xend/XendConfig.py index 76faec9b1a..8ba43cd1ac 100644 --- a/tools/python/xen/xend/XendConfig.py +++ b/tools/python/xen/xend/XendConfig.py @@ -2087,7 +2087,7 @@ class XendConfig(dict): def handle_fileuris(self): for arg in [('PV_kernel', 'use_tmp_kernel'), ('PV_ramdisk', 'use_tmp_ramdisk')]: - if self[arg[0]] != None: + if self[arg[0]]: self[arg[0]], self[arg[1]] \ = xen.util.fileuri.schemes.decode(self[arg[0]]) log.debug("fileuri '%s' = '%s'" % (arg[0], self[arg[0]][:100]))